
#ifndef SUPPORTVERTEXHANDLER_H
#define SUPPORTVERTEXHANDLER_H

#include <BHandler>
#include <BConearRestraint>
#include "SupportVertexPanel.h"

using namespace BWE;

class SupportVertexHandler : public BHandler
{
public:
	SupportVertexHandler();
	~SupportVertexHandler();

protected:
	void slotShapeChanged(BObject* object, const BValue& value);
	void slotRotationChanged(BObject* object, const BValue& value);

protected:
	virtual void attached(BViewer* viewer);
	virtual void detached(BViewer* viewer);

	virtual void paint(BPainter& painter);
	virtual void render(BRender& render);

	virtual void mouseEnterEvent(const BMouseEvent& mouseEvent);
	virtual void mouseLeaveEvent(const BMouseEvent& mouseEvent);
	virtual void mousePressEvent(const BMouseEvent& mouseEvent);
	virtual void mouseReleaseEvent(const BMouseEvent& mouseEvent);
	virtual void mouseMoveEvent(const BMouseEvent& mouseEvent);

protected:
	BHolder<BImage>		_image;
	BHolder<BBody>		_node;
	BLine				_line;
	BPlane				_plane;
	bool				_hovered;
	bool				_selected;
	BMatrix				_matrix;
	BHolder<SupportVertexPanel>	_supportPanel;
};

#endif

